package com.tudouji.project.d3.service.impl;

import java.util.List;
import com.tudouji.common.utils.DateUtils;
import com.tudouji.project.d3.domain.D3Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tudouji.project.d3.mapper.D3OrderItemMapper;
import com.tudouji.project.d3.domain.D3OrderItem;
import com.tudouji.project.d3.service.ID3OrderItemService;

/**
 * D3平台订单明细Service业务层处理
 * 
 * @author tudouji
 * @date 2023-03-29
 */
@Service
public class D3OrderItemServiceImpl implements ID3OrderItemService 
{
    @Autowired
    private D3OrderItemMapper d3OrderItemMapper;

    /**
     * 查询D3平台订单明细
     * 
     * @param id D3平台订单明细ID
     * @return D3平台订单明细
     */
    @Override
    public D3OrderItem selectD3OrderItemById(Long id)
    {
        return d3OrderItemMapper.selectD3OrderItemById(id);
    }
    /**
     * 查询D3平台订单明细列表
     * 
     * @param d3OrderItem D3平台订单明细
     * @return D3平台订单明细
     */
    @Override
    public List<D3OrderItem> selectD3OrderItemList(D3OrderItem d3OrderItem)
    {
        return d3OrderItemMapper.selectD3OrderItemList(d3OrderItem);
    }

    /**
     * 新增D3平台订单明细
     * 
     * @param d3OrderItem D3平台订单明细
     * @return 结果
     */
    @Override
    public int insertD3OrderItem(D3OrderItem d3OrderItem)
    {
        d3OrderItem.setCreateTime(DateUtils.getNowDate());
        return d3OrderItemMapper.insertD3OrderItem(d3OrderItem);
    }

    /**
     * 修改D3平台订单明细
     * 
     * @param d3OrderItem D3平台订单明细
     * @return 结果
     */
    @Override
    public int updateD3OrderItem(D3OrderItem d3OrderItem)
    {
        d3OrderItem.setUpdateTime(DateUtils.getNowDate());
        return d3OrderItemMapper.updateD3OrderItem(d3OrderItem);
    }

    /**
     * 批量删除D3平台订单明细
     * 
     * @param ids 需要删除的D3平台订单明细ID
     * @return 结果
     */
    @Override
    public int deleteD3OrderItemByIds(Long[] ids)
    {
        return d3OrderItemMapper.deleteD3OrderItemByIds(ids);
    }

    /**
     * 删除D3平台订单明细信息
     * 
     * @param id D3平台订单明细ID
     * @return 结果
     */
    @Override
    public int deleteD3OrderItemById(Long id)
    {
        return d3OrderItemMapper.deleteD3OrderItemById(id);
    }
}
